/* 
 * UrlyBirdDataImpl.java 18.07.2011
 *  
 *  
 * Candidate: Alessandra Otterbach
 * Prometric ID: Algisina1
 * Username: Algisina
 *  
 * Sun Certified Developer for Java 2 Platform, Standard Edition Programming 
 * Assignment (CX-310-252A)
 *  
 * This class is part of the Programming Assignment of the Sun Certified 
 * Developer for Java 2 Platform, Standard Edition certification program, must 
 * not be used out of this context and must be used exclusively by Sun 
 * Microsystems, Inc. 
 */
package suncertify.rm;

import java.io.IOException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import suncertify.dao.RoomRecord;
import suncertify.db.DB;
import suncertify.db.Data;
import suncertify.db.exc.DuplicateKeyException;
import suncertify.db.exc.RecordNotFoundException;
import suncertify.db.exc.SecurityException;

/**
 * TODO choices txt this class stellt ein level of separation dar. S. 191 Buch
 * 
 * @author Alessandra Otterbach
 * 
 */
public class UrlyBirdDataImpl extends UnicastRemoteObject implements
	UrlyBirdDataRemote {

    private static final long serialVersionUID = 1L;

    private DB database = null;

    public UrlyBirdDataImpl(String path) throws RemoteException {
	try {
	    database = Data.getInstance(path);
	} catch (RecordNotFoundException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	} catch (IOException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	}
    }

    public void bookRoom(String path, int recNo, RoomRecord room) throws RemoteException
    {
//	database.
	
    }
}
